import { _decorator, Component, Node } from 'cc';
import { AudioManager } from '../../../../common/src/manager/AudioManager';
import { UIManager } from '../../../../framework/ui/uimanager/UIManager';
import { SETTING_TYPE } from '../../../../common/src/util/Enums';
const { ccclass, property } = _decorator;

@ccclass('MenuPanel')
export class MenuPanel extends Component {
    start() {

    }

    // ------------------- 事件 ------------------- //
    // ----------------- 点击事件 ----------------- //
    private onPauseClicked() {
        AudioManager.playButton()
        UIManager.open("setting:res/prefab/SettingDialog", (err, res:Node)=>{
            res.getComponent("SettingDialog").setData({
                type: SETTING_TYPE.GAME
            })
        })
    }

    private onAskClicked() {
        AudioManager.playButton()
        UIManager.open("rule:res/prefab/RuleDialog")
    }
}


